import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login.vue'
import Main from '@/components/Main.vue'
import CustomerCenter from "@/components/customer/CustomerCenter.vue"
import CustomerSystem from "@/components/system/CustomerSystem.vue"
import ProductCategory from "@/components/product/ProductCategory.vue"
import ProductManagement from "@/components/product/ProductManagement.vue"
import ProductSpecifications from "@/components/product/ProductSpecifications.vue"
import MenuSystem from "@/components/system/MenuSystem.vue"
import RoleManagement from "@/components/system/RoleManagement.vue"
import OrderCenter from "@/components/order/OrderCenter.vue";
import MainOfSon from "@/components/MainOfSon.vue";
// 使用vueRouter
Vue.use(Router)
export default new Router({
    mode: 'history',
    routes:[
        {
            path: '/login',
            component: Login,
            name: 'login',
        },
        {
            path: '/main',
            component: Main,
            name: 'main',
            children:[
                {
                    path: '/mainInfo',
                    name:'mainInfo',
                    component:MainOfSon
                },
                {
                    path: '/customerCenter',
                    component: CustomerCenter,
                    name: 'customerCenter',
                },
                {
                    path: '/customerSystem',
                    component: CustomerSystem,
                    name: 'customerSystemSystem',
                },
                {
                    path: '/productCategory',
                    component: ProductCategory,
                    name: 'productCategory',
                },
                {
                    path: '/productManagement',
                    component: ProductManagement,
                    name: 'productManagement',
                },
                {
                    path: '/productSpecifications',
                    component: ProductSpecifications,
                    name: 'productSpecifications',
                },
                {
                    path: '/menuSystem',
                    component: MenuSystem,
                    name: 'menuSystem',
                },
                {
                    path:'/roleManagement',
                    component: RoleManagement,
                    name: 'roleManagement',
                },
                {
                    path:'/orderCenter',
                    component: OrderCenter,
                    name: 'orderCenter',
                }
            ]
        }
    ]
})